package com.itheima.test03;

public class LambdaTest4 {
    public static void main(String[] args) {
        Calculator c = (a, b) -> a+b;
        System.out.println(c.calc(10, 30));
    }
}
interface Calculator{
    int calc(int a,int b);
}
class CalculatorDemo{
    void useCalculator(Calculator calculator){
        calculator.calc(10,20);
    }
}
